package com.shen.demo.excel;

import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.event.AnalysisEventListener;

import java.util.Map;

/**
 * @program: guli_parent
 * @description: 监听器
 * @author: Mr.shen
 * @create: 2020-06-15 16:23
 **/
public class ExcelListener extends AnalysisEventListener<DemoData> {
    //一行一行读取
    @Override
    public void invoke(DemoData demoData, AnalysisContext analysisContext) {
        System.out.println("***"+demoData);
    }

    //获取表头
    @Override
    public void invokeHeadMap(Map<Integer, String> headMap, AnalysisContext context) {
        System.out.println("表头"+headMap);
    }

    //读取之后
    @Override
    public void doAfterAllAnalysed(AnalysisContext analysisContext) {

    }
}
